{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--BOOK_INFORMATION-->\n",
    "<a href=\"https://user-images.githubusercontent.com/19553554/71825144-2d568180-30d6-11ea-8ee0-63c849cfd934.png\" target=\"_blank\"><img align=\"left\" style=\"width: 76px; height: 100px; background: white; padding: 1px; border: 1px solid black; margin-right:10px;\"></a>\n",
    "*pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开源的一个数据可视化 JS 库。用 Echarts 生成的图可视化效果非常棒，为了与 Python 进行对接，方便在 Python 中直接使用数据生成图，于是有人开发出了这个项目[GitHub](https://github.com/pyecharts/pyecharts) .*\n",
    "\n",
    "*Note.建议本程序在参看https://github.com/pyecharts/pyecharts 的安装步骤后再运行； 本程序所有的例子都是从官方提供的样例代码[GitHub](https://github.com/pyecharts/pyecharts-gallery)中提取的,如果对某个API有疑问建议在IDE里面查看*\n",
    "\n",
    "*Echart类型图种大全:https://echarts.apache.org/examples/zh/#chart-type-line pyecharts图导入到ppt中的方法:https://baijiahao.baidu.com/s?id=1663839456876951842&wfr=spider&for=pc.*\n",
    "\n",
    "*作者: LBQ; 时间:2020/7/24. 邮箱:779660843@qq.com*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div id=\"679e68760fdb44698092beb4663ff414\" class=\"chart-container\" style=\"\">\n",
       "            <p class=\"title\" style=\"font-size: 18px; font-weight:bold;\" > Image-基本示例</p>\n",
       "            <p class=\"subtitle\" style=\"font-size: 12px;\" > 我是副标题支持换行哦</p>\n",
       "            <img src=\"https://user-images.githubusercontent.com/19553554/71825144-2d568180-30d6-11ea-8ee0-63c849cfd934.png\" width=\"200px\" height=\"200px\" style=\"margin-top: 20px\" />\n",
       "        </div>\n",
       "\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7f56984007f0>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.components import Image\n",
    "from pyecharts.options import ComponentTitleOpts\n",
    "\n",
    "\n",
    "image = Image()\n",
    "\n",
    "img_src = (\n",
    "    \"https://user-images.githubusercontent.com/19553554/\"\n",
    "    \"71825144-2d568180-30d6-11ea-8ee0-63c849cfd934.png\"\n",
    ")\n",
    "image.add(\n",
    "    src=img_src,\n",
    "    style_opts={\"width\": \"200px\", \"height\": \"200px\", \"style\": \"margin-top: 20px\"},\n",
    ")\n",
    "image.set_global_opts(\n",
    "    title_opts=ComponentTitleOpts(title=\"Image-基本示例\", subtitle=\"我是副标题支持换行哦\")\n",
    ")\n",
    "#image.render(\"image_base.html\")\n",
    "image.load_javascript()\n",
    "image.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
